If NUM=WIDTH2 and X+_BLOCKWIDTH>Screen Width Then X=_BLOCKGAP : Y=Y+_BLOCKHEIGHT+_BLOCKGAP : WIDTH2=WIDTH2+_TOTALWIDTH
If NUM<WIDTH2 Then Get Block NUM,X,Y,_BLOCKWIDTH,_BLOCKHEIGHT,1 : X=X+_BLOCKWIDTH+_BLOCKGAP Else Get Block NUM,X,Y,_BLOCKWIDTH,_BLOCKHEIGHT,1 : X=_BLOCKGAP : Y=Y+_BLOCKHEIGHT+_BLOCKGAP : WIDTH2=WIDTH2+_TOTALWIDTH
If Y+_BLOCKHEIGHT>=Screen Height Then Y=Screen Height
NUM=NUM+1
Until Y>=Screen Height
End Proc
Rem --- A Procedure to paste the blocks to the screen ----------------------
Rem To use this procedure you just call it with the correct values.
Rem For example _PASTEBLOCKS[16,16,10,10,0,0] Will paste 16X16 sized
Rem blocks arranged in a 10x10 grid to the screen without a offset.
Rem It starts pasting from coordinates 0,0 without a offset.
Rem Offsets may be minus values eg.-5
Rem What do the parameters mean?
Rem _BLOCKWIDTH- Width in pixels of your blocks
Rem _BLOCKHEIGHT- Height in pixels of your blocks
Rem _HORIZBLOCKS- # of horizontal blocks in your Map.
Rem _VERTBLOCKS- # of Vertical Blocks in your Map.
Rem XSET- This will offset the blocks by a given value Horizontaly
Rem by however wide your _BLOCKWIDTH is.
Rem YSET- This will offset the blocks by a given value Verticaly